Garbage collection is the process of deallocating storage of objects, or other data structures, that are no longer referenced by or accessible to any process. The goal of garbage collection is to return memory storage currently allocated to inaccessible objects to the pool of memory available for allocation to new objects.
An object consists of a data record and a set of methods or operations that can be invoked on the object. A network object, sometimes herein called a shared object, is an object than can be shared by processes in a distributed computer system. It is generally required that the memory allocated to an object in its owner's address space be retained as long as any process in the distributed system has a handle for that object.
Garbage collection in distributed computer systems is valuable for the same reasons that apply to garbage collection programs that run in a single address space. However, the types of failures that can occur in a distributed computer system make garbage collection of network objects much more difficult. For instance, it is important that an object's memory remain allocated as long as any process has a handle for it. Conversely it is important that memory be reclaimed when there are no more handles to the object anywhere in the system, even if an objects handle was eliminated by the termination of a process. Unfortunately, processes that terminate, normally or abnormally, cannot be expected to reliably notify the owners of all network objects for which those processes have object handles. The present invention provides a mechanism by which an object's owner can determine which processes that had handles to the object have terminated. Another problem that can make garbage collection of network objects difficult is that communication problems can prevent successful transmission of a "handle deleted" message by a process to the object's owner.
For the purposes of this document, a "client" is any process other than the owner of an object that receives a handle for the object. An object "handle" is an object identifier or set of information that allows a process to invoke operations on the object. Those operations are usually performed by the owner process, and thus the owner acts as a server process when operations are invoked on the object(s) that it owns.
Important properties that any distributed garbage collector should have are as follows:
1) The garbage collector should guarantee that an object will not be collected while any process has a handle for it. The one exception is that a long-lasting communication failure may be misinterpreted as a process failure. If communication is later restored and the process with the handle tries to use the handle after the object has been collected, that process must be notified of the error. PA0 2) Storage allocated to an object must be reclaimed when no process holds a handle to it, or if the only processes holding such handles have failed. This is essential to prevent resources from being tied up in long-running servers. PA0 3) An object's handle should be freely transferrable among processes. In particular, a handle can be sent from one client to another, and not just from the object's owner to a client. PA0 4) The garbage collector should not require global synchronization of processes, which would be impractical in large distributed systems. PA0 5) The garbage collector should be efficient in its use of system resources. PA0 6) The operation of the garbage collector should be transparent to the users of the system.